<?php /* Smarty version 2.6.26, created on 2012-08-01 10:28:14
         compiled from majareks_form.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'majareks_form.html', 94, false),array('modifier', 'escape', 'majareks_form.html', 107, false),)), $this); ?>
<?php echo '<?xml'; ?>
 version="1.0" encoding="utf-8"<?php echo '?>'; ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<title>コントロールパネル</title>
		<link rel="stylesheet" href="./assets/styles/default.css" type="text/css" />
		<link rel="stylesheet" href="./assets/styles/ui-lightness/ui.all.css" type="text/css" />
		
		<link rel="stylesheet" href="./assets/styles/ui-lightness/jquery-ui-1.7.3.custom.css" type="text/css" />
		<link rel="stylesheet" href="./assets/styles/dialog.css" type="text/css" />
		
		<script src="assets/scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
		<script src="assets/scripts/jquery-ui-1.7.3.custom.min.js" type="text/javascript"></script>
		<script src="assets/scripts/ui/ui.dialog.js" type="text/javascript"></script>
		
		<script src="assets/scripts/menu.js" type="text/javascript"></script>
		<script src="assets/scripts/table.js" type="text/javascript"></script>
		<script type="text/javascript" src="./tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
		<script type="text/javascript" src="./assets/scripts/editor.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.datepicker.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.core.js"></script>
		
		<script type="text/javascript" src="./assets/scripts/search.js"></script>
		
		<script type="text/javascript">
		$(function() {
			$('.message').fadeIn("slow");
			$('.btn_regist').click(function(){
				if( confirm('登録してよろしいですか？') ){
					document.fm.mode.value = 'input';
					document.fm.submit();
				}
			});
			
			$('.btn_update').click(function(){
				if( confirm('更新してよろしいですか？') ){
					document.fm.mode.value = 'input';
					document.fm.submit();
				}
			});
			$('.btn_return').click(function(){
				location.href = "majareks_index.php?hist=2";
			});
		});
		
		function setS( valcd, valnm ) {
			document.fm.shop_cd.value = valcd;
			document.fm.shop_name.value = valnm;			
			$('#dialog').dialog("close");
		}
	
		function li_add(objID,inID, inVal) {
			if (checkNames(inID)) {
				var strHtml = "<li id='a" + inID +"' class='item_li'> <a href='#'  style='color:red' class='li_del' >X</a>&nbsp;&nbsp;"+ inID + "&nbsp;&nbsp;" + inVal;
				strHtml = strHtml + "<input type='hidden' value='" + inID + "' name ='" + gMutiObj +"_cd[]'>";
				strHtml = strHtml + "<input type='hidden' value='" + inVal + "' name ='" + gMutiObj +"_name[]'>";
				strHtml = strHtml + "</li>";
				$("#" + objID +"_ul").append(strHtml);

			}
		}
		function setS( val ) {
			document.fm.zone_name.value = val;
			$('#dialog').dialog("close");
		}
		</script>
		
	</head>
	<body id="">
<?php echo $this->_tpl_vars['menu']; ?>

<?php echo $this->_tpl_vars['logout']; ?>

		<div id="container"><div class="wrapper">
			<h2>AJAREKSマスター管理</h2>
			<ul class="submenu clearfix">
				<li><a href="majareks_index.php">AJAREKS情報一覧</a></li>
				<li>AJAREKS情報登録/修正</li>
				<li><a href="majareks_import.php">CSV更新</a></li>
			</ul>
			<h3>AJAREKS情報<?php if ($this->_tpl_vars['forms']['id'] == ''): ?>登録<?php else: ?>更新<?php endif; ?><?php if ($this->_tpl_vars['phase'] == 'complete'): ?>完了<?php endif; ?></h3>
<?php if ($this->_tpl_vars['phase'] == 'input'): ?>
			<p class="message">内容を確認し、<?php if ($this->_tpl_vars['forms']['id'] == ''): ?>登録<?php else: ?>更新<?php endif; ?>ボタンをクリックしてください。</p>
			<form name="fm" action="majareks_form.php" method="post">
				<table class="formTable">
					<tbody>
<?php if ($this->_tpl_vars['forms']['id'] != ''): ?>
						<tr>
							<th>更新日</th>
							<td>
								<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['u_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y/%m/%d %H:%M") : smarty_modifier_date_format($_tmp, "%Y/%m/%d %H:%M")); ?>
<input type="hidden" name="u_time" value="<?php echo $this->_tpl_vars['forms']['u_time']; ?>
" />
							</td>
						</tr>
						<tr>
							<th>更新者</th>
							<td>
								<?php echo $this->_tpl_vars['forms']['m_user_name']; ?>
<input type="hidden" name="m_user_name" value="<?php echo $this->_tpl_vars['forms']['m_user_name']; ?>
" />
							</td>
						</tr>

						<tr>
							<th>担当者</th>
							<td>
								<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['userid'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
&nbsp;&nbsp;<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['user_name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>

								<input type="hidden" name="user_name"  value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['user_name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
								<input type="hidden" name="userid"    value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['userid'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
							</td>
						</tr>
						<tr>
							<th>区分</th>
							<td>
								<?php echo $this->_tpl_vars['forms']['area_zone']; ?>
<input type="hidden" name="area_zone"    value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['area_zone'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
								<input type="hidden" name="auth"    value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['auth'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
							</td>
						</tr>
<?php else: ?>
						<tr>
							<th>担当者</th>
							<td>
								<input type="text" name="user_name" class="text" value="左0" readonly="readonly" />
								<input type="hidden" name="userid"  value="10" />
								<button type="button" id="shop" class="btn_search" rel="shop"><span>参照</span></button>
								<?php echo $this->_tpl_vars['err']['shop_cd']; ?>
 
							</td>
						</tr>
<?php endif; ?>
<!--
<?php if ($this->_tpl_vars['forms']['auth'] == '3'): ?>
						<tr>
							<th>※ゾーン</th>
							<td>
								
								<input type="text" name="zone_name" class="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['zone_name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"  maxlangth="100" /><?php echo $this->_tpl_vars['err']['zone_cd']; ?>

								<button type="button" id="zone" class="btn_search" rel="zone"><span>参照</span></button>
							</td>
						</tr>
<?php endif; ?>-->
						<tr>
							<th>※店舗</th>
							<td>
							<button type="button" id="shop" class="btn_search_muti" ><span>店舗追加</span></button><br>
								<ul id="shop_ul" class="item_ul">	
<?php $_from = $this->_tpl_vars['forms']['mutirow']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
        $this->_foreach['member']['iteration']++;
?>
									<li  class='item_li'>
									 <a href='#' class='li_del'  >X</a>&nbsp;&nbsp;<?php echo $this->_tpl_vars['v']['shop_cd']; ?>
&nbsp;&nbsp;<?php echo $this->_tpl_vars['v']['shop_name']; ?>

									<input type='hidden' value='<?php echo $this->_tpl_vars['v']['shop_cd']; ?>
' name ='shop_cd[]'>
									<input type='hidden' value='<?php echo $this->_tpl_vars['v']['shop_name']; ?>
' name ='shop_name[]'>
									</li>
<?php endforeach; endif; unset($_from); ?>
								</ul>
								 <?php echo $this->_tpl_vars['err']['shop_cd']; ?>

							</td>
						</tr>
<!-- 
<?php if ($this->_tpl_vars['forms']['id'] != ''): ?>
						<tr>
							<th>非表示設定</th>
							<td style = "vertical-align:middle">
 <?php if ($this->_tpl_vars['forms']['disp_ng'] == '1'): ?>
								<label><input class="chkinput" type="checkbox" name="disp_ng" value="1" checked /> 非表示にする</label>
 <?php else: ?>
								<label><input class="chkinput" type="checkbox" name="disp_ng" value="1"  /> 非表示にする</label>
 <?php endif; ?>
							</td>
						</tr>
 <?php endif; ?>
 -->
					</tbody>
				</table>
				<p class="button">
<?php if ($this->_tpl_vars['forms']['id'] != ''): ?>
					<button type="button" class="btn_return" class="submit"><span>戻る</span></button>
					<button type="button" class="btn_update" class="submit"><span>更新</span></button>
<?php else: ?>
					<button type="button" class="btn_regist" class="submit"><span>登録</span></button>
<?php endif; ?>
				</p>
				<input type="hidden" name="id" value="<?php echo $this->_tpl_vars['forms']['id']; ?>
" />
				<input type="hidden" name="mode" value="" />
			</form>

<div id="dialog" >
</div>
 <div id="dialogmuti" >
</div>
 
<?php endif; ?>

<?php if ($this->_tpl_vars['phase'] == 'complete'): ?>
			<p class="message"><?php echo $this->_tpl_vars['message']; ?>
</p>
			<ul>
<?php if ($this->_tpl_vars['forms']['id'] != ''): ?>
				<li>>> <a href="majareks_index.php?hist=2">一覧ページに戻る</a></li>
<?php else: ?>
				<li>>> <a href="majareks_index.php">一覧ページに戻る</a></li>
<?php endif; ?>
<?php if ($this->_tpl_vars['forms']['id'] != ''): ?>
				<li>>> <a href="majareks_form.php?id=<?php echo $this->_tpl_vars['forms']['id']; ?>
">更新</a></li>
<?php endif; ?>
			</ul>
<?php endif; ?>

		</div></div>
		<?php echo $this->_tpl_vars['footer']; ?>

	</body>
</html>